package com.ty.day3;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/14 11:53
 */
public class Point {
    private double x, y;
    public Point() {

    }

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public void up(){
        y++;
    }
    public void done(){
        y--;
    }
    public void left(){
        x--;
    }
    public void right(){
        x++;
    }

    public void point() {
        System.out.println("("+x+","+y+")");;
    }
}
